package cl.zeke.pizzastore.finders;

import cl.zeke.pizzastore.negocio.entities.Perfil;
import java.util.List;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

@Repository
@Transactional(propagation = Propagation.MANDATORY)
public class PerfilFinder {
    
    @PersistenceContext
    private EntityManager em;

    public List<Perfil> traerTodos() {
        return em.createNamedQuery("Perfil.findAll").getResultList();
    }
    
}
